﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using SapB1WebPOS.DAL;
using SapB1WebPOS.Utils;

namespace SapB1WebPOS.BLL
{
    public class LoginBLL
    {
        public string GetLogin(string sapUserName, string sapPassword, string companyDB)
        {
            try
            {
                LoginDAO connect = new LoginDAO();
                string resultMess = connect.GetLogin(sapUserName, sapPassword, companyDB);
                if (resultMess.Length == 0)
                {
                    resultMess = "SUCCESS";

                }
                return resultMess;
            }
            catch (Exception ex)
            {
                Log.WriteException(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType, "SystemError", ex);
                return ex.Message;
            }
        }
    }
}